/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package com.infoq.bambook

import groovy.xml.MarkupBuilder
import org.custommonkey.xmlunit.*
/**
 *
 * @author zhangkf
 */
class SnbTools {
    static String snbc4EachContent(_title, _content){
        def writer = new StringWriter()
        def xml = new MarkupBuilder(writer)

        xml.snbc() {
            head() {
                title(_title)
            }
            body() {
                text "<<!CDATA[$_content]]>>"
            }
        }

        println writer.toString()
        return writer.toString()
    }
}

